package com.lucky.demo.listener;

import com.lucky.common.base.BaseController;
import javax.annotation.security.PermitAll;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;


@Controller("HosController")
@RequestMapping("/hos")
public class HosController extends BaseController {


    @PreAuthorize("hasAuthority('/hos/miList')") // 允许所有用户（包括匿名）
    @GetMapping("/miList")
    public String miList(ModelMap model) {
        return "demo/goods";
    }

    @GetMapping("/miList/enter")
    public ModelAndView miListEnter(@RequestParam("id") Long id, @RequestParam("ybjId") Long ybjId, @RequestParam("ybjAid") String ybjAid) {
        return redirectView("/login/dash");
    }

}

